Time to clearance

There are multiple ways to define time to clearance. Time to first 40 is the easiest.

Model of viral clearance

Plot data - those with vaccination status

## [1] 0.2407676

Spline fits

mgcv

Estimated parameters

Figure 1 - model fits

## Warning in predict.gam(mod_gam, data.frame(time = xs, ID = -1), re.effect = NA):
## factor levels -1 not in original fit

Individual fits data 1 - we pick the individuals with the most data

Compute area under the curve

## Doing D max = 5 ....
## Doing D max = 7 ....
## Doing D max = 14 ....

Reduction in AUCs

## Model 1: Wilcoxon test for AUC up to day 5: p= 0.111739195226888
## Model 2: Wilcoxon test for AUC up to day 5: p= 0.316863840361176
## Model 1: Wilcoxon test for AUC up to day 7: p= 0.111739195226888
## Model 2: Wilcoxon test for AUC up to day 7: p= 0.221712829556926
## Model 1: Wilcoxon test for AUC up to day 14: p= 0.117380981951652
## Model 2: Wilcoxon test for AUC up to day 14: p= 0.245812783926006

## 
##  Welch Two Sample t-test
## 
## data:  colMeans(thetas_mod1$theta_rand[, not_vacc_ind, 2]) and colMeans(thetas_mod1$theta_rand[, vacc_ind, 2])
## t = -1.9886, df = 36.564, p-value = 0.05427
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.361691462  0.003456161
## sample estimates:
##   mean of x   mean of y 
## -0.08503056  0.09408709

Fold change

## Model 1: Wilcoxon test for AUC up to day 5: p= 0.123243976073209
## Model 2: Wilcoxon test for AUC up to day 5: p= 0.235961134973544
## Model 1: Wilcoxon test for AUC up to day 7: p= 0.129333176207536
## Model 2: Wilcoxon test for AUC up to day 7: p= 0.170886312654057
## Model 1: Wilcoxon test for AUC up to day 14: p= 0.138901834310099
## Model 2: Wilcoxon test for AUC up to day 14: p= 0.203689049566973

Variants and vaccines

effect of variant

## 
##             Alpha             Delta           Epsilon                NV 
##                14                50                12                27 
##           Omicron             Other       OtherVOIVOC Suspected Omicron 
##                40               107                 5                25

effect of vaccine

## 
##  0  1 
## 60 17

Sensitivity analysis - AUC day 7 models

AUC reduction - only using data up to day 7

Sample size estimation